﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DocumentManagement.Models;
using System.Web.Mvc;

namespace DocumentManagement.Views
{
    public class NeedToChargeViewData : BaseViewData
    {
        public BaoGao[]  BGs { get; set; }
        public YuanGong[] Employees { get; set; }
    }
    public class NeedToCharge : BaseView<NeedToChargeViewData>
    {
        public SelectListItem[] GetEmployeeDropList()
        {
            var list = new SelectListItem[this.Model.Employees.Length];

            int i = 0;
            foreach (var yg in this.Model.Employees)
            {
                list[i++] = new SelectListItem()
                {
                    Text = yg.name,
                    Value = yg.id.ToString()
                };
            }

            return list;

        }
    }
}
